package com.js.lottery.domin.strategy.service.draw;

import com.js.lottery.domin.strategy.model.aggregates.StrategyRich;
import com.js.lottery.domin.strategy.model.vo.AwardBriefVO;
import com.js.lottery.domin.strategy.repository.IStrategyRepository;

import javax.annotation.Resource;

/**
 * @description: 数据&配置支持，比如说从数据库中读取需要的数据
 * @author:Pine Jiang
 * @Date:2023/11/19
 *
 *
 **/


public class DrawStrategySupport extends DrawConfig{
    @Resource
    protected IStrategyRepository strategyRepository;

    /**
     * 查询策略配置信息，得到策略聚合对象
     *
     * @param strategyId 策略ID
     * @return 策略配置信息
     */
    protected StrategyRich queryStrategyRich(Long strategyId){
        return strategyRepository.queryStrategyRich(strategyId);
    }

    /**
     * 查询奖品详情信息
     *
     * @param awardId 奖品ID
     * @return 中奖详情
     */
    protected AwardBriefVO queryAwardInfoByAwardId(String awardId){
        return strategyRepository.queryAwardInfo(awardId);
    }
}
